package com.git.bds.mr.records.model.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 病历信息表
 * </p>
 *
 * @author 成大事
 * @since 2022-09-27 14:48:01
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("records")
@ApiModel(value = "Records对象", description = "病历信息表")
public class Records extends Model<Records> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("病历id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("患者id")
    @TableField("patient_id")
    private Long patientId;

    @ApiModelProperty("医院id")
    @TableField("hospital_id")
    private Long hospitalId;

    @ApiModelProperty("医生id")
    @TableField("doctor_id")
    private Long doctorId;

    @ApiModelProperty("患者姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty("年龄")
    @TableField("age")
    private String age;

    @ApiModelProperty("民族")
    @TableField("nationality")
    private String nationality;

    @ApiModelProperty("0：M；1：W")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty("婚姻情况")
    @TableField("marital_status")
    private String maritalStatus;

    @ApiModelProperty("出生地")
    @TableField("birthplace")
    private String birthplace;

    @ApiModelProperty("籍贯")
    @TableField("hometown")
    private String hometown;

    @ApiModelProperty("职业")
    @TableField("profession")
    private String profession;

    @ApiModelProperty("工作单位")
    @TableField("employer")
    private String employer;

    @ApiModelProperty("现住址")
    @TableField("current_address")
    private String currentAddress;

    @ApiModelProperty("电话号码")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("入院时间")
    @TableField("admission_time")
    private LocalDateTime admissionTime;

    @ApiModelProperty("记录时间")
    @TableField("record_time")
    private LocalDateTime recordTime;

    @ApiModelProperty("病史叙述者")
    @TableField("history_narrator")
    private String historyNarrator;

    @ApiModelProperty("可靠程度")
    @TableField("reliability")
    private String reliability;

    @ApiModelProperty("病史主诉")
    @TableField("main_suit")
    private String mainSuit;

    @ApiModelProperty("现病史")
    @TableField("hpi")
    private String hpi;

    @ApiModelProperty("既往史")
    @TableField("past_history")
    private String pastHistory;

    @ApiModelProperty("系统回顾")
    @TableField("system_review")
    private String systemReview;

    @ApiModelProperty("个人史")
    @TableField("personal_history")
    private String personalHistory;

    @ApiModelProperty("婚姻史")
    @TableField("marriage_history")
    private String marriageHistory;

    @ApiModelProperty("家族史")
    @TableField("family_history")
    private String familyHistory;

    @ApiModelProperty("月经及生育史（女性特有）")
    @TableField("menstruation_and_fertility_history")
    private String menstruationAndFertilityHistory;

    @ApiModelProperty("体格检查")
    @TableField("physical_check")
    private String physicalCheck;

    @ApiModelProperty("辅助检查")
    @TableField("auxiliary_examination")
    private String auxiliaryExamination;

    @ApiModelProperty("摘要")
    @TableField("summary")
    private String summary;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    public static final String ID = "id";

    public static final String PATIENT_ID = "patient_id";

    public static final String HOSPITAL_ID = "hospital_id";

    public static final String DOCTOR_ID = "doctor_id";

    public static final String NAME = "name";

    public static final String AGE = "age";

    public static final String NATIONALITY = "nationality";

    public static final String SEX = "sex";

    public static final String MARITAL_STATUS = "marital_status";

    public static final String BIRTHPLACE = "birthplace";

    public static final String HOMETOWN = "hometown";

    public static final String PROFESSION = "profession";

    public static final String  EMPLOYER = "employer";

    public static final String CURRENT_ADDRESS = "current_address";

    public static final String PHONE = "phone";

    public static final String ADMISSION_TIME = "admission_time";

    public static final String RECORD_TIME = "record_time";

    public static final String HISTORY_NARRATOR = "history_narrator";

    public static final String RELIABILITY = "reliability";

    public static final String MAIN_SUIT = "main_suit";

    public static final String HPI = "hpi";

    public static final String PAST_HISTORY = "past_history";

    public static final String SYSTEM_REVIEW = "system_review";

    public static final String PERSONAL_HISTORY = "personal_history";

    public static final String MARRIAGE_HISTORY = "marriage_history";

    public static final String FAMILY_HISTORY = "family_history";

    public static final String MENSTRUATION_AND_FERTILITY_HISTORY = "menstruation_and_fertility_history";

    public static final String PHYSICAL_CHECK = "physical_check";

    public static final String AUXILIARY_EXAMINATION = "auxiliary_examination";

    public static final String SUMMARY = "summary";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
